package mk.com.ldm.corepoint.implementation.client.presenter;

import mk.com.ldm.corepoint.implementation.client.CoreServiceAsync;
import mk.com.ldm.corepoint.implementation.shared.FormObject;
import mk.com.ldm.corepoint.implementation.shared.TemporaryStorage;

import org.gwt.mosaic.ui.client.InfoPanel;

public class EventHandler {
	
	private static EventHandler eventHandler;
	private CoreServiceAsync rpcService;

	public void setRpcService(CoreServiceAsync rpcService) {
		this.rpcService = rpcService;
	}

	public static EventHandler getInstance(){
		if(eventHandler==null)
			eventHandler = new EventHandler();
		return eventHandler;
	}
	
	public void fireEvent(final String type, final String call){
		FormObject form = TemporaryStorage.getInstance().getForm();	
		InfoPanel.show(type, call);
		
	}
	
}
